	function move(obj,attr,target,speed,callback){
		clearInterval(obj.timer)
		var current = parseInt(getComputedStyle(obj,null)[attr])
		if(current > target){
			speed = -speed
		}
		obj.timer = setInterval(function(){
			var oldvalue = parseInt(getComputedStyle(obj,null)[attr]);
			var newvalue = oldvalue +speed;
			if((speed < 0 && newvalue < target) || (speed > 0 && newvalue > target)){
				newvalue = target;
			}
			
			obj.style[attr] = newvalue + "px";
			if(newvalue == target){
				clearInterval(obj.timer);
				callback();
			}
		},10)
	}
	function addClass(obj,cn){
		obj.className +=" "+cn
	}
	function hasClass(obj,cn){
		var reg = new RegExp("\\b"+cn+"\\b") 
		console.log(reg.test(obj.className))
		return reg.test(obj.className)
	}
	function removeClass(obj,cn){
		var reg = new RegExp("\\b"+cn+"\\b")
		console.log(obj.className)
		obj.className = obj.className.replace(reg , "")
		console.log(obj.className)
	}
	function toggleClass(obj,cn){
		if(hasClass(obj,cn))
			removeClass(obj,cn)
		else
			addClass(obj,cn)
	}
	
	